package com.example.mulittenantdemo.controller;


import com.example.mulittenantdemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/login")
@Validated
public class LoginController {
    @Autowired
    private UserService userService;

    @RequestMapping("/login/{user}/{pwd}")
    public String login(@PathVariable("user") String user, @PathVariable("pwd") String pwd) {
             return userService.login(user,pwd);
    }
}
